{if $data.tree.parent>0}{assign var="selected" value=$data.tree.parent}{else}{assign var="selected" value="0"}{/if}
<link rel="styleSheet" href="_tvs_system_core_/design/tree.css" type="text/css" />
<script type="text/javascript" src="_tvs_system_core_/js/dtree.js"></script>
<div class="dtree">
<script type="text/javascript">
		<!--
	d = new dTree('d');
    d.config.useCookies=true;
    d.config.useSelection=true;
    {if $smarty.get.id == '' || $smarty.get.id == 0}
    d.clearCookie();
    {/if}
	d.add(0,-1,'{t t=$smarty.session.lang}','index.php?admin=1&id=0&body=admin/body/content.htm');
	{assign var="current_page" value=""}
	{foreach from=$tree item="el"}
		{if $el.id==$smarty.get.id}{assign var="current_page" value=$el.id}{/if}
		d.add({$el.id},{$el.parent.id|default:0},'{if $el.hide==0}<font style="color: #989898;">{$el.name|addslashes}</font>{else}{$el.name|addslashes}{/if}','index.php?admin=1&id={$el.id}&body=admin/body/content.htm','','','_tvs_system_core_/design/images/tree/{if $el.type=='secure_folder01'}securefolder.gif{elseif $el.type=='tvcatalog_week'}week.gif{elseif $el.type=='tvcatalog_day'}day.gif{elseif $el.type=='folder01'}folder.gif{else}page.gif{/if}','_tvs_system_core_/design/images/tree/{if $el.type=='secure_folder01'}securefolder.gif{elseif $el.type=='tvcatalog_week'}week.gif{elseif $el.type=='tvcatalog_day'}day.gif{elseif $el.type=='folder01'}folder.gif{else}page.gif{/if}');
	{/foreach}
  	document.write(d);
  	{if $current_page>0}
  		d.openTo({$current_page}, true);
  	{/if}
		//-->
	</script>
</div>
